export const API_SYS_CHANNEL_AREA_LIST = '/platform/sys/channel/area/list'
export const API_SYS_CHANNEL_AREA_CREATE = '/platform//sys/channel/area/create'
export const API_SYS_CHANNEL_AREA_DISABLED = '/platform/sys/channel/area/disabled'
export const API_SYS_CHANNEL_AREA_GET = '/platform/sys/channel/area/get/'
export const API_SYS_CHANNEL_AREA_DELETE = '/platform/sys/channel/area/delete/'
export const API_SYS_CHANNEL_AREA_UPDATE = '/platform/sys/channel/area/update'
export const API_SYS_CHANNEL_AREA_OPTION = '/platform/sys/plat/data'

import request from '/@/utils/request'

export function getList(data: object) {
    return request({
        url: API_SYS_CHANNEL_AREA_LIST,
        method: 'POST',
        params: data
    })
}

export function doCreate(data: object = {}) {
    return request({
        url: API_SYS_CHANNEL_AREA_CREATE,
        method: 'POST',
        data: data
    })
}

export function doDisable(data: object = {}) {
    return request({
        url: API_SYS_CHANNEL_AREA_DISABLED,
        method: 'POST',
        data: data
    })
}

export function doUpdate(data: object = {}) {
    return request({
        url: API_SYS_CHANNEL_AREA_UPDATE,
        method: 'POST',
        data: data
    })
}

export function getInfo(id: string) {
    return request({
        url: API_SYS_CHANNEL_AREA_GET + id,
        method: 'GET'
    })
}

export function doDelete(id: string) {
    return request({
        url: API_SYS_CHANNEL_AREA_DELETE + id,
        method: 'DELETE'
    })
}


export function reqChannelList(data?: { channelId: string }) {
    return request({
        url: API_SYS_CHANNEL_AREA_OPTION,
        method: 'POST',
        data
    })
}
